package com.weijx.dishes.controller;

import org.springframework.web.bind.annotation.RestController;

import com.weijx.dishes.entity.User;
import com.weijx.dishes.service.UserService;
import com.weijx.dishes.utils.ReturnResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;

/**
 * com.weijx.dishes.controller.UserController
 * 描述：
 * on 2025/11/7-上午10:49
 *
 * @author weijx
 */
@RestController
@RequestMapping("/api/users")
public class UserController {
    @Resource
    private UserService userService;

    @GetMapping
    public ReturnResult<List<User>> getAllUsers() {
        return ReturnResult.success(userService.selectAllUsers());
    }
}